Skip to content

feat: Add elemental fractions to material recording#5270

Closed
56laurenwills wants to merge 1 commit intoacts-project:mainfrom
56laurenwills:working_branch
Closed

feat: Add elemental fractions to material recording#5270
56laurenwills wants to merge 1 commit intoacts-project:mainfrom
56laurenwills:working_branch

Conversation

@56laurenwills
Copy link

@56laurenwills 56laurenwills commented Mar 20, 2026

Extend material recording to include all elements and their fraction seen at a material interaction. Include a toggle to enable or disable this feature. Extend the BinnedSurfaceMaterial class to include this information in material mapping. This information is needed for detailed material composition studies and to make the material description compatible with Geant4.

--- END COMMIT MESSAGE ---

@noemina - tagging for review

Extend material recording to include all elements and their fraction
seen at a material interaction. Include a toggle to enable or disable
this feature. Extend the BinnedSurfaceMaterial class to include this
information in material mapping. This information is needed for detailed
material composition studies and to make the material description
compatible with Geant4.
@56laurenwills 56laurenwills changed the title Feat: Add elemental fractions to material recording feat: Add elemental fractions to material recording Mar 20, 2026
@github-actions github-actions bot added this to the next milestone Mar 20, 2026
@github-actions github-actions bot added Component - Core Affects the Core module Component - Examples Affects the Examples module Component - Plugins Affects one or more Plugins labels Mar 20, 2026
@andiwand andiwand marked this pull request as draft March 23, 2026 08:09
@andiwand andiwand requested review from asalzburger and noemina March 23, 2026 08:09
std::shared_ptr<Algorithm::Config>>(alg, "Config")
.def(py::init<>());
ACTS_PYTHON_STRUCT(c, outputMaterialTracks, excludeMaterials);
ACTS_PYTHON_STRUCT(c, outputMaterialTracks, excludeMaterials, DetailedMaterial);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using CamelCase, in this case it needs to be "detailMaterial", however, I would even make it more explicit: "recordElementFactions".

std::shared_ptr<EventStore> eventStore;

std::vector<std::string> excludeMaterials = {};
bool DetailedMaterial = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment "this should be more explicit & it should start with a small letter".

MappingType mappingType = MappingType::Default);
MappingType mappingType = MappingType::Default,
ElementZMatrix elementZ = {},
ElementFracMatrix elementFrac = {});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should discuss this, I think a better way to think about it is to have this part of the MaterialSlab (optional).

@asalzburger
Copy link
Contributor

Great to see this moving forward!!!

I have the following suggestion:

  • let's split this into small PRs (as we all have something to discuss)
  1. First PR should only add the recording of the ElementFraction to the Geant4 job: this one is pretty much ready with some style changes

  2. We should discuss how to store the element fraction: you have added it to the BinnedSurfaceMaterial but then it would not be possible to do it with the GridSurfaceMaterial neither with the Homogenous one ... I would suggest we add the elements and element fractions optionally to the MaterialSlab. ( 2nd PR)

  3. We tacke the averaging and filling of it ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component - Core Affects the Core module Component - Examples Affects the Examples module Component - Plugins Affects one or more Plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants